package com.baizhi.util;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class FileLoad {
//    static {
//
//        try {
//
//        } catch (IOException e) {
//            e.printStackTrace();
//        }
//    }
    public static void main(String[] args) throws IOException {
        Properties pro = new Properties();
        InputStream is = FileLoad.class.getResourceAsStream("/test.properties");
//      InputStream is = new FileInputStream("F:\\framework\\idea\\ajaxday03\\src\\main\\resources\\test.properties");
        pro.load(is);
        String username = pro.getProperty("username");
        System.out.println(username);
    }


}
